<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Http\Requests\LoginRequest;
use App\Repositories\LoginRepositories;
use Illuminate\Http\Request;

class PublicController extends Controller
{
    protected $repo;

    public function __construct(LoginRepositories $repo)
    {
        $this->repo = $repo;
    }

    public function loginshow()
    {
        return view('admin.login');
    }

    public function login(LoginRequest $request)
    {
        return $this->repo->check($request);
    }

    public function logout()
    {
        auth()->guard('admin')->logout();
        return redirect(route('admin.login'));
    }


}
